//绘制简单的9图
//argument0 spr argument1 index argument2 iw argument3 ihargument4 w argument5 h
var spr = argument[0];
var ind = argument[1];

var iw = argument[2]; //边缘宽高
var ih = argument[3];

var draw_w = argument[4]; //绘制宽高
var draw_h = argument[5];

var xx = argument[6]; //绘制坐标
var yy = argument[7];

var spr_w = sprite_get_width(spr); //精灵宽高
var spr_h = sprite_get_height(spr);

var spr_ww = spr_w-2*iw; //spr裁剪中间宽高
var spr_hh = spr_h-2*ih;

var draw_ww = draw_w-2*iw; //绘制中间宽高
var draw_hh = draw_h-2*ih;

draw_sprite_part_ext(spr, ind, 0,                 0,     iw,     ih,            xx,            yy,              1,              1, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw,                0, spr_ww,     ih,         xx+iw,            yy, draw_ww/spr_ww,              1, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw+spr_ww,         0,     iw,     ih, xx+iw+draw_ww,            yy,              1,              1, draw_get_color(), draw_get_alpha());

draw_sprite_part_ext(spr, ind, 0,                ih,     iw, spr_hh,            xx,         yy+ih,              1, draw_hh/spr_hh, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw,               ih, spr_ww, spr_hh,         xx+iw,         yy+ih, draw_ww/spr_ww, draw_hh/spr_hh, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw+spr_ww,        ih,     iw, spr_hh, xx+iw+draw_ww,         yy+ih,              1, draw_hh/spr_hh, draw_get_color(), draw_get_alpha());

draw_sprite_part_ext(spr, ind, 0,         ih+spr_hh,     iw,     ih,            xx, yy+ih+draw_hh,              1,              1, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw,        ih+spr_hh, spr_ww,     ih,         xx+iw, yy+ih+draw_hh, draw_ww/spr_ww,              1, draw_get_color(), draw_get_alpha());
draw_sprite_part_ext(spr, ind, iw+spr_ww, ih+spr_hh,     iw,     ih, xx+iw+draw_ww, yy+ih+draw_hh,              1,              1, draw_get_color(), draw_get_alpha());




